import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const routes = [{
    path: '/home', //首页一级路由
    name: 'Home',
    component: () =>
        import ('../views/Home.vue'),

    children: [{
        path: 'recommended', //首页二级路由，推荐
        name: 'Recommended',
        component: () =>
            import ('../views/homeall/recommended.vue')
    },
    {
        path: 'free', //首页二级路由，免费
        name: 'Free',
        redirect: '/home/free/new',
        component: () =>
            import ('../views/homeall/free.vue'),
        children: [{ //三级路由，最新
            path: 'new',
            name: 'new',
            component: () =>
                import ('../views/homeall/three/new.vue')
        },
        { //三级路由，最热
            path: 'hot',
            name: 'hot',
            component: () =>
                import ('../views/homeall/three/hot.vue')
        },


        ]

    },
    {
        path: 'actual', //首页二级路由，实战
        name: 'Actual',
        component: () =>
            import ('../views/homeall/actual.vue'),

        children: [{ //三级路由
            path: 'default',
            name: 'default',
            component: () =>
                import ('../views/homeall/three/default.vue'),

        },
        { //三级路由
            path: 'newest',
            name: 'newest',
            component: () =>
                import ('../views/homeall/three/newest.vue')
        },
        { //三级路由
            path: 'volume',
            name: 'volume',
            component: () =>
                import ('../views/homeall/three/volume.vue')
        },
        { //三级路由
            path: 'update',
            name: 'update',
            component: () =>
                import ('../views/homeall/three/update.vue')
        },
        {
            path: '/home/actual', //当路径为？？？的时候
            redirect: '/home/actual/default' //把当前的路径切换成/home
        }

        ]
    },
    {
        path: 'system', //首页二级路由，体系
        name: 'System',
        redirect: '/home/system/nav1',
        component: () =>
            import ('../views/homeall/system.vue'),
        children: [{
            path: 'nav1',
            name: 'Nav1',
            component: () =>
                import ('../views/homeall/threeall/nav1.vue'),



        }, {
            path: 'nav2',
            name: 'Nav2',
            component: () =>
                import ('../views/homeall/threeall/nav2.vue'),

        }, {
            path: 'nav3',
            name: 'Nav3',
            component: () =>
                import ('../views/homeall/threeall/nav3.vue'),
        }]
    },
    {
        path: 'column', //首页二级路由，专栏
        name: 'Column',
        redirect: '/home/column/columnson1',
        component: () =>
            import ('../views/homeall/column.vue'),
        children: [{

            path: 'columnson1', //首页三级路由，专栏
            name: 'Columnson1',
            component: () =>
                import ('../views/homeall/threeall/columnson1'),
        },
        {
            path: 'columnson2', //首页三级路由，专栏
            name: 'Columnson2',
            component: () =>
                import ('../views/homeall/threeall/columnson2'),
        },
        {

            path: 'columnson3', //首页三级路由，专栏
            name: 'Columnson3',
            component: () =>
                import ('../views/homeall/threeall/columnson3'),
        },
        {

            path: 'columnson4', //首页三级路由，专栏
            name: 'Columnson4',
            component: () =>
                import ('../views/homeall/threeall/columnson4'),
        },
        ]
    },
    {
        path: 'tutorial', //首页二级路由，教程
        name: 'Tutorial',
        component: () =>
            import ('../views/homeall/tutorial.vue')
    },

    ]

},
{
    path: '/details', //详情页路由
    name: 'details',
    component: () =>
        import ('../views/homeall/details.vue')
},
{
    path: '/classification', //分类一级路由
    name: 'Classification',
    component: () =>
        import ('../views/classification.vue')
}, {
    path: '/found', //发现一级路由
    name: 'Found',
    component: () =>
        import ('../views/found.vue'),
    children: [{
        path: 'recom', //发现二级、推荐
        name: 'Recom',
        component: () =>
            import ('../views/foundall/recom.vue'),

    },
    {
        path: 'focus', //发现二级、关注
        name: 'Focus',
        component: () =>
            import ('../views/foundall/focus.vue'),

    },
    {
        path: '/',
        redirect: '/found/recom',
    }

    ]
}, {
    path: '/learning', //学习一级路由
    name: 'Learning',
    redirect: '/learning/xuexi',
    component: () =>
        import ('../views/learning.vue'),

    // 学习二级路由配置
    children: [{
        path: 'xuexi', //学习二级路由，学习
        name: 'XueXi',
        redirect: '/learning/xuexi/course11',
        component: () =>
            import ('../components/learningcomp/erji/xuexi.vue'),

        children: [{
            path: 'course11', //学习-我的课程-三级路由
            name: 'Course11',
            component: () =>
                import ('@/components/learningcomp/sanji/course11.vue'),
        },
        {
            path: 'course12', //学习-我的专栏-三级路由
            name: 'Course12',
            component: () =>
                import ('../components/learningcomp/sanji/course12.vue'),
        },
        ]
    },

    {
        path: 'kecheng', //学习二级路由,课程
        name: 'KeCheng',
        component: () =>
            import ('../components/learningcomp/erji/kecheng.vue'),
    },

    ],

},
// 学习签到的路由配置
{
    path: '/SignIn',
    name: 'SignIn',
    component: () =>
        import ('@/components/learningcomp/erji/SignIn.vue'),
},
// 学习报告路由配置
{
    path: '/kebiao', //学习-我的专栏-三级路由
    name: 'kebiao',
    component: () =>
        import ('../components/learningcomp/erji/kebiao.vue'),
},
// 学习收藏的路由配置
{
    path: '/Favorites',
    name: 'Favorites',
    redirect: 'Favorites/favorites11',
    component: () =>
        import ('@/components/learningcomp/Contents/Favorites.vue'),
    children: [{
        path: 'Favorites11', //学习-我的课程-2级路由
        name: 'Favorites11',
        redirect: '/Favorites/favorites11/favorites111',
        component: () =>
            import ('@/components/learningcomp/Contents/Favorites11.vue'),
        children: [{
            path: 'Favorites111', //学习-我的课程-全部-3级路由
            name: 'Favorites111',
            component: () =>
                import ('@/components/learningcomp/Contents/Favorites111.vue'),
        },
        {
            path: 'Favorites112', //学习-我的课程-全部-3级路由
            name: 'Favorites112',
            component: () =>
                import ('@/components/learningcomp/Contents/Favorites112.vue'),

        },
        {
            path: 'Favorites113', //学习-我的课程-全部-3级路由
            name: 'Favorites113',
            component: () =>
                import ('@/components/learningcomp/Contents/Favorites113.vue'),

        }
        ],
    },

    {
        path: 'Favorites2', //学习-我的课程-专栏-2级路由
        name: 'Favorites2',
        component: () =>
            import ('@/components/learningcomp/Contents/Favorites2.vue'),
    },
    {
        path: 'Favorites3', //学习-我的课程-教程-2级路由
        name: 'Favorites3',
        component: () =>
            import ('@/components/learningcomp/Contents/Favorites3.vue'),
    }
    ]

},
// 学习问答的路由配置
{
    path: '/Questions',
    name: 'Questions',
    component: () =>
        import ('@/components/learningcomp/Contents/Questions.vue'),
},
// 学习笔记的路由配置
{
    path: '/notes',
    name: 'Notes',
    component: () =>
        import ('@/components/learningcomp/Contents/notes.vue'),
},
// 学习手记的路由配置
{
    path: '/HandNotes',
    name: 'HandNotes',
    component: () =>
        import ('@/components/learningcomp/Contents/HandNotes.vue'),
},
// 学习下载的路由配置
{
    path: '/download',
    name: 'Download',
    component: () =>
        import ('@/components/learningcomp/Contents/download.vue'),
},
// 学习路由配置结束


{
    path: '/account', //账号一级路由
    name: 'Account',
    component: () =>
        import ('../views/account.vue'),



},
{
    path: '/text',
    name: 'Text',
    component: () =>
        import ('../components/accountcomp/text.vue')
},
{
    path: '/myhome',
    name: 'Myhome',
    component: () =>
        import ('../components/accountcomp/myhome.vue')
},
{
    path: '/set',
    name: 'Set',
    component: () =>
        import ('../components/accountcomp/set.vue')
},
{
    path: '/faq',
    name: 'Faq',
    component: () =>
        import ('../components/accountcomp/faq.vue')
},
{
    path: '/shop',
    name: 'Shop',
    component: () =>
        import ('../components/accountcomp/shop.vue')
},
{
    path: '/math',
    name: 'Math',
    component: () =>
        import ('../components/accountcomp/math.vue')
},
{
    path: '/head',
    name: 'Head',
    component: () =>
        import ('../components/accountcomp/head.vue'),
    children: [{
        path: 'stud',
        name: 'Stad',
        component: () =>
            import ('../components/accountcomp/er/stud.vue'),
    },

    ]
},
{
    path: '/guanzhu',
    name: 'Guanzhu',
    component: () =>
        import ('../components/accountcomp/guanzhu.vue'),
    children: [{
        path: 'guanzhuzi',
        name: 'Guanzhuzi',
        component: () =>
            import ('../components/accountcomp/er/guanzhuzi.vue'),

    },
    {
        path: 'fans',
        name: 'Fans',
        component: () =>
            import ('../components/accountcomp/er/fans.vue'),
    }

    ]
},
{
    path: '/detail', // 发现详情页
    name: 'Detail',
    component: () =>
        import ('../views/foundall/detail.vue')
},
{
    path: '/tiaozhuan', // 发现二详情页
    name: 'Tiaozhuan',
    component: () =>
        import ('@/components/foundcomp/tiaozhuan.vue')
},
{
    path: '/pay', // 发现详情、点击
    name: 'Pay',
    component: () =>
        import ('@/components/foundcomp/pay.vue')
},
{
    path: '/jkqq', // 发现详情、点击二
    name: 'Jkqq',
    component: () =>
        import ('@/components/foundcomp/jkqq.vue')
},
{
    path: '/text1', // 发现详情页
    name: 'Text',
    component: () =>
        import ('../views/text.vue')
},
{
    path: '/zm', // 发现详情页
    name: 'Zm',
    component: () =>
        import ('../views/accountall/zm.vue')
},
{
    path: '/',
    redirect: '/home/recommended',
},

]

const router = new VueRouter({
    // mode: 'history',
    base: process.env.BASE_URL,
    routes
})



export default router